//package com.fang.java.config;
//
//import org.springframework.security.core.authority.AuthorityUtils;
//import org.springframework.security.core.userdetails.User;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
//
//public class CusSecurityUserDetailService implements UserDetailsService  {
//
//	@Override
//	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
//	 
//		BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();		// 加密	
//		String encodedPassword = passwordEncoder.encode("123456");
//	    User user = new User(username, encodedPassword,
//	              AuthorityUtils.commaSeparatedStringToAuthorityList("admin"));
//	    return user;
//	}
//
//}
